package com.feng.zhongji.service;

import com.feng.zhongji.bean.Department;
import com.feng.zhongji.mapper.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class DepartmentServiceImpl implements DepartmentService{
    @Autowired
    private DepartmentMapper departmentMapper;
    @Override
    public List<Department> getAllDept() {
//        return departmentMapper.selectList(null);
        List<Department> departments = departmentMapper.selectList(null);//[null, null, null, null]//查询结果是空的，不知道为什么，数据库中是有值的
        System.out.println(departments);
        return departments;
    }
}
